#include "engine.h"
namespace HEngine
{
    engine::engine(int width, int height, int depth,std::string title)
    {
        Window = new sf::RenderWindow(sf::VideoMode(width,height,depth),title);
        //entManager = new entityManager(this);
    }

    void engine::run()
    {
        sf::Event Event;
        while(Window->IsOpened())
        {
            while(Window->GetEvent(Event))
            {
                if(Event.Type == sf::Event::Closed)
                {
                    Window->Close();
                }
            }
            Window->Clear();
            Window->Display();
        }
    }

    entityManager* engine::getEntityManager()
    {
        return entManager;
    }

    sf::RenderWindow* engine::getWindow()
    {
        return Window;
    }
    void engine::stop()
    {
        Window->Close();
    }

    engine::~engine()
    {
        //dtor
    }
}
